1. Field of the Invention
The present invention relates to techniques for correcting blur in the image of an object that is caused by the motion of an imaging device.
2. Description of the Related Art
At present, imaging devices, such as digital cameras and the like, are often equipped with various functions for compensating for camera shake (i.e., image stabilization functions) in order to prevent the image of an object from being blurred by the motion of the image device due to, for example, camera shake caused by the user during shooting. There are basically two techniques of image stabilization, optical image stabilization and electrical image stabilization. In electrical image stabilization, a plurality of images captured are used to correct blur in the object image by image processing. Japanese Patent No. 4178481 discloses a technique of correcting blur in the object image by calculating a motion vector by feature pattern matching between two captured images, and rotating and translating one of the images based on the direction and amount of the motion vector.
When the imaging device is tilted downward relative to the optical axis, that is, in the pitch direction, portions having higher image height of the object image may be distorted into a trapezoidal shape; that is, the so-called “keystone effect” may occur. When the “keystone effect” occurs, a plurality of motion vectors having different components are detected in the image because the amount of blur in the image varies depending on the position in the image. Also, when the imaging device is moved, the amount of blur in the object image may vary depending on the position in the image because of the difference in distance between the imaging device and the object. Japanese Patent Laid-Open No. 2009-258868 discloses a technique of correcting blur in the object image by dividing a captured image into a plurality of regions, detecting a motion vector for each region, and correcting the image by applying different correction amounts based on the motion vectors to the different regions.
However, when an image is corrected by applying different correction amounts to different regions as in Japanese Patent Laid-Open No. 2009-258868, the following problem may arise. If the number of regions into which the image is divided is small, there may be variations in the detected motion vector. Specifically, when the image is corrected on a region-by-region basis, a discontinuation (positional offset) may occur in the object image between some adjacent regions, and the user may recognize such a positional offset as an image degradation. If the number of regions into which the image is divided is increased (the size of each region is decreased), the variations in the detected motion vector can be reduced, but the amount of computation increases that is required to calculate affine coefficients for the regions that are used to obtain correction amounts for the regions. In other words, particularly when image stabilization is applied to moving images, the increase in the amount of computation may lead to a reduction in the frame rate at which the moving images are processed.